package org.ejc.persist.model;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class TaskHasConventionExecutivePK implements Serializable {

    /** identifier field */
    private Integer taskId;

    /** identifier field */
    private Integer conventionExecutiveId;

    /** full constructor */
    public TaskHasConventionExecutivePK(Integer taskId, Integer conventionExecutiveId) {
        this.taskId = taskId;
        this.conventionExecutiveId = conventionExecutiveId;
    }

    /** default constructor */
    public TaskHasConventionExecutivePK() {
    }

    public Integer getTaskId() {
        return this.taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public Integer getConventionExecutiveId() {
        return this.conventionExecutiveId;
    }

    public void setConventionExecutiveId(Integer conventionExecutiveId) {
        this.conventionExecutiveId = conventionExecutiveId;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("taskId", getTaskId())
            .append("conventionExecutiveId", getConventionExecutiveId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof TaskHasConventionExecutivePK) ) return false;
        TaskHasConventionExecutivePK castOther = (TaskHasConventionExecutivePK) other;
        return new EqualsBuilder()
            .append(this.getTaskId(), castOther.getTaskId())
            .append(this.getConventionExecutiveId(), castOther.getConventionExecutiveId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getTaskId())
            .append(getConventionExecutiveId())
            .toHashCode();
    }

}
